/*
 * =====================================================================================
 *
 *       Filename:  const-value-test.cpp
 *
 *    Description:  常用常量值测试
 *
 *        Version:  1.0
 *        Created:  2011-11-11 14:13:14
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  YOUR NAME (),
 *        Company:
 *
 * =====================================================================================
 */

#include <iostream>
#include <ctime>
#include <cstdlib>

#define PRINT_SIZEOF(name) std::cout << "sizeof(" << #name << ")=" << sizeof(name) << std::endl;
#define PRINT_NAME(name) std::cout << #name << "=" << name << std::endl;

int main(int argc, const char *argv[])
{
    PRINT_SIZEOF(char);
    PRINT_SIZEOF(char *);
    PRINT_SIZEOF(short);
    PRINT_SIZEOF(short *);
    PRINT_SIZEOF(int);
    PRINT_SIZEOF(int *);
    PRINT_SIZEOF(long);
    PRINT_SIZEOF(long *);
    PRINT_SIZEOF(float);
    PRINT_SIZEOF(float *);
    PRINT_SIZEOF(double);
    PRINT_SIZEOF(double *);

    PRINT_NAME(RAND_MAX);
    PRINT_NAME(__LINE__);
    PRINT_NAME(__FILE__);
    PRINT_NAME(__DATE__);
    PRINT_NAME(__TIME__);
    PRINT_NAME(__TIMESTAMP__);
    PRINT_NAME(__STDC__);
    return 0;
}
